//package com.plian.system.controller.transfer;
//
//import com.alibaba.fastjson.JSON;
//import com.plian.Tools.StringUtil;
//import com.plian.system.dto.qg.subsidiary.ReformTransferFileDTO;
//import com.plian.system.model.R;
//import com.plian.system.service.transfer.ISubsidiaryMixedReformTransferService;
//import com.plian.system.vo.qg.subsidiary.SubsidiaryMixedReformVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//
//import java.util.List;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping(value = "api/subsidiarymixedreformtransfer")
//@Api(value = "混改数据对接", tags = "混改数据对接")
//public class SubsidiaryMixedReformTransferController {
//
//    private ISubsidiaryMixedReformTransferService subsidiaryMixedReformTransferService;
//
//    @PostMapping(value = "/save/registerList")
//    @ApiOperation(value = "混改登记数据")
//    public R registerList(@RequestBody List<SubsidiaryMixedReformVO> subsidiaryMixedReformVOList){
//        String message = subsidiaryMixedReformTransferService.checkRegisterList(subsidiaryMixedReformVOList);
//        if (StringUtil.isNotBlank(message)){
//            return R.fail(message);
//        }
//        return R.status(subsidiaryMixedReformTransferService.saveRegisterList(subsidiaryMixedReformVOList));
//    }
//
//    @PostMapping(value = "/save/changeList")
//    @ApiOperation(value = "混改变更数据")
//    public R changeList(@RequestBody List<SubsidiaryMixedReformVO> subsidiaryMixedReformVOList){
//        String message = subsidiaryMixedReformTransferService.checkChangeList(subsidiaryMixedReformVOList);
//        if (StringUtil.isNotBlank(message)){
//            return R.fail(message);
//        }
//        return R.status(subsidiaryMixedReformTransferService.saveChangeList(subsidiaryMixedReformVOList));
//    }
//
//    @PostMapping(value = "/save/outList")
//    @ApiOperation(value = "混改注销数据")
//    public R outList(@RequestBody List<SubsidiaryMixedReformVO> subsidiaryMixedReformVOList){
//        String message = subsidiaryMixedReformTransferService.checkOutList(subsidiaryMixedReformVOList);
//        if (StringUtil.isNotBlank(message)){
//            return R.fail(message);
//        }
//        return R.status(subsidiaryMixedReformTransferService.saveOutList(subsidiaryMixedReformVOList));
//    }
//
//    @PostMapping(value = "/save/file")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "files", value = "附件", required = true),
//            @ApiImplicitParam(name = "fileInfo", value = "附件信息", required = true)
//    })
//    @ApiOperation(value = "附件", notes = "覆盖原有数据 传入文件、文件信息json fileInfo 列子: [\n" +
//            "    {\n" +
//            "        \"dataSourceId\":5,\n" +
//            "        \"fileMD5List\":[\"c3307d8ca12d84d44e55b298f9d2dc02\"]\n" +
//            "    },\n" +
//            "     {\n" +
//            "        \"dataSourceId\":20,\n" +
//            "        \"fileMD5List\":[\"c3307d8ca12d84d44e55b298f9d2dc02\"]\n" +
//            "    }\n" +
//            "] , dataSourceId 数据源id，type 1决策文件 2合同 fileMD5List 文件md5值")
//    public R file(@RequestParam(value = "files") List<MultipartFile> files, @RequestParam String fileInfo){
//        List<ReformTransferFileDTO> reformTransferFileDTOS = JSON.parseArray(fileInfo, ReformTransferFileDTO.class);
//        return R.status(subsidiaryMixedReformTransferService.saveFile(files, reformTransferFileDTOS));
//    }
//}
